home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / alangsbs.zip / EAT5.ASM < prev    next >
Assembly Source File  |  1989-12-27  |  3KB  |  78 lines

  1. ;---------------------------------------------------------------
  2. ;                             EAT5.ASM
  3. ;   Backhanded advertising program, full screen, with macros
  4. ;
  5. ;                                      by Jeff Duntemann
  6. ;                                      MASM/TASM
  7. ;                                      Last update 12/27/89
  8. ;---------------------------------------------------------------
  9.  
  10. INCLUDE MYLIB.MAC               ; Load in screen control macro library
  11.  
  12. ;----------------------------|
  13. ;    BEGIN STACK SEGMENT     |
  14. ;----------------------------|
  15. MYSTACK    SEGMENT STACK        ; STACK word ensures loading of SS by DOS
  16.  
  17.            DB      64 DUP ('STACK!!!') ; This reserves 512 bytes for the stack
  18.  
  19. MYSTACK    ENDS
  20. ;----------------------------|
  21. ;     END STACK SEGMENT      |
  22. ;----------------------------|
  23.  
  24.  
  25. ;----------------------------|
  26. ;     BEGIN DATA SEGMENT     |
  27. ;----------------------------|
  28. MyData     SEGMENT
  29.  
  30. LRXY       DW      184FH ; 18H = 24D; 4FH = 79D; 0-based XY of LR screen corner
  31.  
  32. VidOrigin  DD      0B8000000H   ; Change to 0B0000000H if you have a mono CRT!
  33. Eat1       DB      "Eat at Joe's..."
  34. Eat1Length EQU $-Eat1
  35. Eat2       DB      "...ten million flies can't ALL be wrong!"
  36. Eat2Length EQU $-Eat2
  37. CRLF       DB      0DH,0AH
  38.  
  39. MyData     ENDS
  40. ;----------------------------|
  41. ;      END DATA SEGMENT      |
  42. ;----------------------------|
  43.  
  44. ;----------------------------|
  45. ;     BEGIN CODE SEGMENT     |
  46. ;----------------------------|
  47.  
  48. MyProg     SEGMENT
  49.  
  50.            assume CS:MyProg,DS:MyData
  51. Main       PROC
  52.  
  53. Start:     ; This is where program execution begins:
  54.            mov  AX,MyData   ; Set up our own data segment address in DS
  55.            mov  DS,AX       ; Can't load segment reg. directly from memory
  56.  
  57.            Clear VidOrigin,07B0H,4000  ; Replace B0 with 20 for space clear
  58.  
  59.            GotoXY 14H,09H              ; Position cursor
  60.            Write Eat1,Eat1Length       ;  and display first text line
  61.  
  62.            GotoXY 14H,0AH              ; Position cursor
  63.            Writeln Eat2,Eat2Length     ;  and display second text line
  64.  
  65.            mov  AH,4CH      ; Terminate process DOS service
  66.            mov  AL,0        ; Pass this value back to ERRORLEVEL
  67.            int  21H         ; Control returns to DOS
  68.  
  69. Main       ENDP
  70.  
  71. MyProg     ENDS
  72.  
  73. ;----------------------------|
  74. ;      END CODE SEGMENT      |
  75. ;----------------------------|
  76.  
  77.            END Start    ; The procedure named Start becomes the main program
  78.